﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceRptList.aspx.cs"  EnableEventValidation="false" Inherits="WMS6.Web.Analytics.InvoiceRptList" meta:resourcekey="Page" %>

<%@ PreviousPageType VirtualPath="~/Analytics/InvoiceRptQuery.aspx" %>
<%@ Register Src="../UserControls/Pager.ascx" TagName="Pager" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>InvoiceRptList</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />

    <script src="../Js/jquery.js" type="text/javascript"></script>

    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>

    <script src="../Js/util.js" type="text/javascript"></script>

    <script src="../Js/InitPage.js" type="text/javascript"></script>

    <script src="../Js/checkbox.js" type="text/javascript"></script>

    <script type="text/javascript">
    
      window.onload = function(){
            initListPage();
        }
        
        function returnSearch()
        {
            var from = document.getElementById("hdnFrom").value;
            if(from != "")
            {
                window.location.href = "InvoiceRptQuery.aspx";
            }
            else
            {
                window.history.go(-1);
            }
        }
        
        function showAction()
		{	
			var pos = getElementPos("btnAction");	
			document.getElementById("actionDiv").style.top = pos.y+17;
			document.getElementById("actionDiv").style.left = pos.x;  			
			document.getElementById("hiddenFlag").value = '1';
		}
		
		function hiddenDiv()
		{
			var flag = document.getElementById("hiddenFlag").value
			if(flag == "1")
			{
				document.getElementById("actionDiv").style.display = "block";
				document.getElementById("hiddenFlag").value = '0';
			}
			else 
			{
				document.getElementById("actionDiv").style.display = "none";
			}
		}
    </script>

</head>
<body>
    <form id="F15621" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id="div_List_top">
            <table>
                <tr>
                    <td valign="bottom">
                        <asp:Label ID="lblInvoiceList" runat="server" CssClass="label_header" Text="发票报告"
                            meta:resourcekey="lblInvoiceList"></asp:Label>
                    </td>
                    <td>
                        <asp:Button ID="btnRefresh" runat="server" CssClass="button" Enabled="False" Text="<%$ Resources:ButtonResource,btnRefresh %>"
                            OnClick="btnRefresh_Click" meta:resourcekey="btnRefreshResource1" />
                    </td>
                    <td>
                        <input id="btnAction" type="button" runat="server" value="<%$Resources:ButtonResource,btnAction%>"
                             class="button" onclick="showAction();" />
                    </td>
                </tr>
            </table>
        </div>
        <div class="blank8">
        </div>
        <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
                <div id="div_List">
                    <div id="div_List_msg">
                        <asp:Label ID="lblMsg" runat="server" CssClass="label_message" 
                            meta:resourcekey="lblMsgResource1"></asp:Label>
                    </div>
                    <asp:GridView ID="gvInvoice" runat="server" AutoGenerateColumns="False" AllowSorting="True"
                        CssClass="gridview" OnRowDataBound="gvInvoice_RowDataBound" OnSorting="gvInvoice_Sorting"
                        DataKeyNames="OWNER_ID,INVOICE_ID,IS_INVOICE_SUBMIT,IS_AMOUNT_SUBMIT" PageSize="20" Width="1850px" OnInit="gvInvoice_Init"
                        meta:resourcekey="gvInvoice">
                        <FooterStyle CssClass="GridViewFooterStyle" />
                        <RowStyle CssClass="GridViewRowStyle" />
                        <HeaderStyle CssClass="GridViewHeaderStyle" />
                        <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                        <Columns>
                            <asp:BoundField HeaderText="序号" FooterText="序号" meta:resourcekey="BoundField">
                                <ItemStyle CssClass="GridViewRowWidth_40" />
                            </asp:BoundField>
                            <asp:TemplateField meta:resourcekey="TemplateField">
                                <HeaderTemplate>
                                    <img src="../Images/gvSettingpic.gif" id="img01" class="gvSettingImg" onclick="gvUserSetting('15621','gvInvoice');"
                                        onmouseover="showGVUserSettingAlt(this);" alt="customize list" />
                                    <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvInvoice');"
                                        meta:resourcekey="CheckBox1" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="chbSelect" runat="server"  meta:resourcekey="chbSelect" />
                                </ItemTemplate>
                                <FooterTemplate>
                                    <asp:CheckBox ID="CheckBox2" runat="server" onclick="selectAll(this,'gvInvoice');"
                                        meta:resourcekey="CheckBox2" />
                                </FooterTemplate>
                                <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_50" />
                                <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_50" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="OWNER_ID" HeaderText="货主代码" FooterText="货主代码" SortExpression="OWNER_ID"
                                meta:resourcekey="OWNER_ID">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            <asp:TemplateField FooterText="货主名称" HeaderText="货主名称" SortExpression="COMPANY"
                                meta:resourcekey="COMPANY">
                                <ItemTemplate>
                                    <asp:Label ID="lblCompany" runat="server" Text='<%# Eval("COMPANY").ToString() %>'
                                        meta:resourcekey="lblCompany"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_200" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="STATEMENT_ID" HeaderText="对账单" FooterText="对账单" SortExpression="STATEMENT_ID"
                                meta:resourcekey="STATEMENT_ID">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:BoundField DataField="DESCR" HeaderText="开票内容" FooterText="开票内容" SortExpression="DESCR"
                                meta:resourcekey="DESCR">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:BoundField DataField="BILLING_DATE" HeaderText="开票日期" FooterText="开票日期" SortExpression="BILLING_DATE"
                                meta:resourcekey="BILLING_DATE">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:TemplateField FooterText="发票编号" HeaderText="发票编号" SortExpression="INVOICE_ID"
                                meta:resourcekey="INVOICE_ID">
                                <ItemTemplate>
                                    <asp:Label ID="lblInvoiceID" runat="server" Text='<%# Eval("INVOICE_ID").ToString() %>'
                                        meta:resourcekey="lblInvoiceID"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>
                            
                            <asp:BoundField DataField="USER_NAME" HeaderText="开票人" FooterText="开票人" SortExpression="USER_NAME"
                                meta:resourcekey="USER_NAME">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:TemplateField FooterText="发票金额" HeaderText="发票金额" SortExpression="INVOICE_AMOUNT"
                                meta:resourcekey="INVOICE_AMOUNT">
                                <ItemTemplate>
                                    <asp:Label ID="lblInvoiceAmount" runat="server" Text='<%# Eval("INVOICE_AMOUNT").ToString() %>'
                                        meta:resourcekey="lblInvoiceAmount"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="STATUS_D" HeaderText="发票状态" FooterText="发票状态" SortExpression="STATUS_D"
                                meta:resourcekey="STATUS_D">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:TemplateField FooterText="发票上交" HeaderText="发票上交" SortExpression="IS_INVOICE_SUBMIT"
                                meta:resourcekey="IS_INVOICE_SUBMIT">
                                <ItemTemplate>
                                    <asp:Label ID="lblInvoiceSubmit" runat="server" Text='<%# Eval("IS_INVOICE_SUBMIT").ToString() %>'
                                        meta:resourcekey="lblInvoiceSubmit"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>
         
                            <asp:TemplateField FooterText="款项上交" HeaderText="款项上交" SortExpression="IS_AMOUNT_SUBMIT"
                                meta:resourcekey="IS_AMOUNT_SUBMIT">
                                <ItemTemplate>
                                    <asp:Label ID="lblAmountSubmit" runat="server" Text='<%# Eval("IS_AMOUNT_SUBMIT").ToString() %>'
                                        meta:resourcekey="lblAmountSubmit"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="USER_1" HeaderText="仓租费" FooterText="仓租费" SortExpression="USER_1"
                                meta:resourcekey="WarehouseFee">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:BoundField DataField="USER_1" HeaderText="装卸费" FooterText="装卸费" SortExpression="USER_1"
                                meta:resourcekey="LoadFee">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:BoundField DataField="USER_1" HeaderText="备注" FooterText="备注" SortExpression="USER_1"
                                meta:resourcekey="Remark">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                                              
                        </Columns>
                    </asp:GridView>
                    
                    <div>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr style="height: 10px">
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td class="Result_01">
                                    总计：
                                </td>
                                <td class="Result_02">
                                    <table>
                                        <tr>
                                            <td style="margin-right: 20px;">
                                                &nbsp; &nbsp;
                                            </td>
                                                <td>
                                                <asp:Label ID="lblAllTotalAmount" runat="server" Text="发票金额:" class="label" 
                                                        meta:resourcekey="lblAllTotalAmountResource1"></asp:Label>
                                                <asp:Label ID="lblAllTotalAmountText" runat="server" class="label" 
                                                        Style="margin-right: 10px;" meta:resourcekey="lblAllTotalAmountTextResource1"></asp:Label>
                                            </td>
                                            
                                        </tr>
                                    </table>
                                </td>
                                <td class="Result_03">
                                </td>
                            </tr>
                            <tr style="height: 20px">
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div id="div_pager">
                    <uc1:Pager ID="PagerFooter" runat="server" OnFirst="btnFirst_Click" OnPrevious="btnPrevious_Click"
                        OnNext="btnNext_Click" OnLast="btnLast_Click" OnGoTo="GoTo_Click" />
                </div>
                <input type="hidden" runat="server" id="hdnFrom" />
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnList" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="btnRefresh" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
        <input type="hidden" id="hdnActionID" runat="server" />
        <div id="div_List_bottom">
            <table>
                <tr>
                    <td>
                        <asp:Button ID="btnSearch" runat="server" Text="<%$ Resources:ButtonResource,btnNewSearch %>"
                            CssClass="button" Enabled="False" 
                            OnClientClick="javascript:window.location.href='InvoiceRptQuery.aspx';return false;" 
                            meta:resourcekey="btnSearchResource1" />
                    </td>
                    <td>
                        <asp:Button ID="btnReSearch" runat="server" Text="<%$ Resources:ButtonResource,btnReSearch %>"
                            CssClass="button" Enabled="False" 
                            OnClientClick="javascript:returnSearch();return false;" 
                            meta:resourcekey="btnReSearchResource1" />
                    </td>
                    <td>
                        <asp:Button ID="btnList" runat="server" Text="<%$ Resources:ButtonResource,btnList %>"
                            CssClass="button" Enabled="False" OnClick="btnList_Click" 
                            meta:resourcekey="btnListResource1" />
                    </td>
                    <td>
                        <asp:Button ID="btnExport" runat="server" Text="<%$ Resources:ButtonResource,btnExport %>"
                            CssClass="button" Enabled="False" OnClick="btnExport_Click" 
                            meta:resourcekey="btnExportResource1" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div id="actionDiv" style="background-color: #FFFFFF; position: absolute; display: none;
        border: none 0 black">
        <table width="105" border="0" cellspacing="0" cellpadding="0" id="divcontent_menu">
            <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                <td class="line" id="tdlnkbtnInvoiceSubmit" runat="server" visible="False">
                    <asp:LinkButton ID="lnkbtnInvoiceSubmit" runat="server" Text="发票上交"
                        OnClick="lnkbtnInvoiceSubmit_Click" 
                        meta:resourcekey="lnkbtnInvoiceSubmitResource1"></asp:LinkButton>
                </td>
            </tr>
            <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                <td class="line" id="tdlnkbtnAmountSubmit" runat="server" visible="False">
                    <asp:LinkButton ID="lnkbtnAmountSubmit" runat="server" Text="款项上交"
                        OnClick="lnkbtnAmountSubmit_Click" 
                        meta:resourcekey="lnkbtnAmountSubmitResource1"></asp:LinkButton>
                </td>
            </tr>
            <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                <td class="line" id="tdlnkbtnInvoiceCancle" runat="server" visible="False">
                    <asp:LinkButton ID="lnkbtnInvoiceCancle" runat="server" Text="发票取消"
                        OnClick="lnkbtnInvoiceCancle_Click" 
                        meta:resourcekey="lnkbtnInvoiceCancleResource1"></asp:LinkButton>
                </td>
            </tr>
            <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                <td class="line" id="tdlnkbtnAmountCancle" runat="server" visible="False">
                    <asp:LinkButton ID="lnkbtnAmountCancle" runat="server" Text="款项取消"
                        OnClick="lnkbtnAmountCancle_Click" 
                        meta:resourcekey="lnkbtnAmountCancleResource1"></asp:LinkButton>
                </td>
            </tr>
        </table>
    </div>
    <input type="hidden" id="hiddenFlag" />
    </form>
</body>
</html>
<script language="javascript" type="text/javascript" event="onclick" for="document">
		<!--
		    hiddenDiv();
		//-->
</script>